I can't figure out why my code will not compile.
The error listed above is the only error shown on the terminal.
I have tried taking the ';' after the main(void) statement (as suggested on similar posts) but this just leads to more compilation errors.
Does anybody have any ideas???
Code:
#include <stdio.h>
int main(void);
{
double change ;
int quater =0 , dime =0 , nickel =0 , penny =0 ;
printf("how much change is owed?\n");
scanf("%lf" , &change);
do
{
if (change >= 0.25);
{
quarter = quarter++ ;
change = (change - 0.25);
}
else if (0.25 > change >= 0.1);
{
dime = dime++ ;
change = (change - 0.1);
}
else if (0.1 > change >= 0.05);
{
nickel = nickel++ ;
change = (change - 0.05);
}
else if (0.05 > change >= 0.01);
{
penny = penny++ ;
change = (change - 0.01);
}
}
while (change > 0);
printf("the number of quarters is: %f\n" , &quarter);
printf("the number of dimes is: %f\n" , &dime);
printf("the number of nickels is: %f\n" , &nickel);
printf("the number of pennys is: %f\n" , &penny);
}